package com.acsior.hibernate.dao;

import static org.hibernate.criterion.Restrictions.eq;

import org.hibernate.Criteria;

import com.acsior.dac.impl.hibernate.dao.HibernateDAO;
import com.acsior.ddfn.impl.hibernate.dao.NomElementDAO;
import com.acsior.hibernate.vo.NomProductTypeVO;

/**
 * Клас, който обслужва
 * 
 * @author <d.kolev@acsior.com>
 */
public class NomProductTypeDAO extends NomElementDAO<NomProductTypeVO> {

	/** nomProductStatus */
	private static final String NOM_PRODUCT_STATUS = "nomProductStatus";

	/** */
	public NomProductTypeDAO() {
		super();
	}

	/** @see HibernateDAO#createCriteria() */
	@Override
	public Criteria createCriteria() {
		Criteria criteria = super.createCriteria();
		criteria.createCriteria(NOM_PRODUCT_STATUS).add(eq(SYSTEM_NAME, "active"));
		return criteria;
	}

	/**
	 * Не добавя условие за статус на обекта
	 * 
	 * @return Criteria
	 */
	public Criteria createIgnoreStatusCriteria() {
		return super.createCriteria();
	}

}